<?php
function get_online_num($userid){
	$query="SELECT COUNT(USERID) AS ONLINENUMS FROM user WHERE LEVEL=".STUDENT." AND USERGROUP=$userid AND STATUS=".ONLINE;
	$result=mysql_query($query);
	return $result;
}
function get_status_students($userid){
	$query="SELECT * FROM user WHERE LEVEL=".STUDENT." AND USERGROUP=$userid ORDER BY STATUS DESC";
	$result=mysql_query($query);
	return $result;
}
?>